<?php
if ($use_username) {
	$username = array(
		'name'	=> 'username',
		'id'	=> 'username',
                'class' => 'input-large',
                'placeholder' => 'Usuario',
		'value' => set_value('username'),
		'maxlength'	=> $this->config->item('username_max_length', 'tank_auth'),
		'size'	=> 30,
	);
}
$email = array(
	'name'	=> 'email',
	'id'	=> 'email',
        'class' => 'input-large',
        'placeholder' => 'E-Mail',
	'value'	=> set_value('email'),
	'maxlength'	=> 80,
	'size'	=> 30,
);
$password = array(
	'name'	=> 'password',
	'id'	=> 'password',
        'class' => 'input-large',
        'placeholder' => 'Constraseña',
	'value' => set_value('password'),
	'maxlength'	=> $this->config->item('password_max_length', 'tank_auth'),
	'size'	=> 30,
);
$confirm_password = array(
	'name'	=> 'confirm_password',
	'id'	=> 'confirm_password',
        'class' => 'input-large',
        'placeholder' => 'Constraseña',
	'value' => set_value('confirm_password'),
	'maxlength'	=> $this->config->item('password_max_length', 'tank_auth'),
	'size'	=> 30,
);
$captcha = array(
	'name'	=> 'captcha',
	'id'	=> 'captcha',
        'class' => 'input-large',
        'placeholder' => 'Código',
	'maxlength'	=> 8,
);
$form_atributes = array('class' => 'form-horizontal');
$label_username_atributes=array('class' => 'control-label');
$label_email_atributes=array('class' => 'control-label');
$label_password_atributes=array('class' => 'control-label');
$label_confirm_password_atributes=array('class' => 'control-label');
$label_confirmation_code_atributes=array('class' => 'control-label');
$form_submit_atritubes=array('class' => 'btn btn-primary','name'=>'submit','value' => 'Registrarme')

?>
<div class="span5 offset4">
         </br>
         </br>
         </br>
         </br>
    <?php if(isset($errors[$username['name']])): ?>
    <div class="alert alert-error">
        <?php echo $errors[$username['name']]?>
    </div>
    <?php endif ?>
    <?php if(isset($errors[$email['name']])): ?>
    <div class="alert alert-error">
        <?php echo $errors[$email['name']] ?>
    </div>
    <?php endif ?>    
         
         
<?php echo form_open($this->uri->uri_string(), $form_atributes); ?>

	<?php if ($use_username) : ?>
	
            <div class="control-group">
                <?php echo form_label('Usuario:', $username['id'],$label_username_atributes); ?>
                <div class="controls">
                    <?php echo form_input($username); ?>
                </div>
            </div>
            <?php echo form_error($username['name'],'<div class="alert alert-error">','</div>'); ?>

	<?php endif ?>
         
         <div class="control-group">
             <?php echo form_label('E-Mail:', $email['id'],$label_email_atributes); ?>
             <div class="controls">
                 <?php echo form_input($email); ?>
             </div>
         </div>
         
        <?php echo form_error($email['name'],'<div class="alert alert-error">','</div>'); ?>
	
         <div class="control-group">
             <?php echo form_label('Contraseña:', $password['id'],$label_password_atributes); ?>
             <div class="controls">
                 <?php echo form_password($password); ?>
             </div>
         </div>
         
        <?php echo form_error($password['name'],'<div class="alert alert-error">','</div>'); ?>
	
         <div class="control-group">
             <?php echo form_label('Confirmar Contraseña:', $confirm_password['id'],$label_confirm_password_atributes); ?>
             <div class="controls">
                 <?php echo form_password($confirm_password); ?>
             </div>
         </div>
         
        <?php echo form_error($confirm_password['name'],'<div class="alert alert-error">','</div>'); ?>
	

	<?php if ($captcha_registration) :
		if ($use_recaptcha) : ?>
	
		
			<div id="recaptcha_image"></div>
			<a href="javascript:Recaptcha.reload()">Get another CAPTCHA</a>
			<div class="recaptcha_only_if_image"><a href="javascript:Recaptcha.switch_type('audio')">Get an audio CAPTCHA</a></div>
			<div class="recaptcha_only_if_audio"><a href="javascript:Recaptcha.switch_type('image')">Get an image CAPTCHA</a></div>
			<div class="recaptcha_only_if_image">Enter the words above</div>
			<div class="recaptcha_only_if_audio">Enter the numbers you hear</div>
		
		<input type="text" id="recaptcha_response_field" name="recaptcha_response_field" />
		<?php echo form_error('recaptcha_response_field','<div class="alert alert-error">','</div>'); ?>)
		<?php echo $recaptcha_html; ?>
	
	<?php  else : ?>
	 <div class="control-group">
             <div class="controls">
                 <p>Ingrese el código exactamente como aparece:</p>
             </div>
              <div class="controls">
                 <?php echo $captcha_html; ?>
             </div>
         </div>
          <div class="control-group">
             <?php echo form_label('Código de Confirmación:', $captcha['id'],$label_confirmation_code_atributes); ?>
             <div class="controls">
                 <?php echo form_input($captcha); ?>
             </div>
         </div>
        <?php echo form_error($captcha['name'],'<div class="alert alert-error">','</div>'); ?>
	
	<?php endif; ?>
        <?php endif ?>
<div class="control-group">
    <div class="controls">
        <?php echo form_submit($form_submit_atritubes); ?>
    </div>
</div>

<?php echo form_close(); ?>
</div>